package com.woniu.humanresource.entity;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.security.core.parameters.P;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Achievement {
    //绩效实体类

    //员工id
    private int id;
    //员工姓名
    private String name;
    //部门
    private String pname;
    //职位
    private String position;
    //业绩考核总分
    private int efficiencyScore;
    //行为考核总分
    private int behaviorScore;
    //考核总分
    private int totalScore;
    //考核人员姓名
    private String uname;
    //考核日期
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date date;


    //业绩考核对象
    private List<AchievementEfficiency> achievementEfficiencies;

    //行为考核对象
    private List<AchievementBehavior> achievementBehaviors;


    public int getTotalScore() {
        return efficiencyScore+behaviorScore;
    }


}
